﻿<%@ Page Title="药品库存明细" Language="C#" MasterPageFile="~/Master/MasterPage_New.master"
    AutoEventWireup="true" CodeBehind="Stocks_Group_Hos.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.Stocks.Stocks_Group_Hos" %>

<%@ Register Src="~/Common/WebUserArea.ascx" TagName="WebUserArea" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">

        function Button1_onclick()
        {
            var vareid;
            if ($("#ctl00_ContentPlaceHolder1_WebUserArea1_ddlCountry").val() == "0")
            {
                //如果地市为全部  全省为全部 返回空
                if ($("#ctl00_ContentPlaceHolder1_WebUserArea1_ddlCountry").val() == "0")
                {
                    vareid = "";
                }
                //如果地市为全部  省市有值 返回空省市值
                else
                {
                    vareid = $("#ctl00_ContentPlaceHolder1_WebUserArea1_ddlCountry").val();
                }
            } //如果地市有值 返回地市值
            else
            {
                vareid = $("#ctl00_ContentPlaceHolder1_WebUserArea1_ddlCountry").val();
            }
            document.getElementById("ctl00_ContentPlaceHolder1_hisAreaid").value = vareid;
        }
        function loadcity()
        {
            $.get("../Common/GetArea.ashx", { areaid: $("#ctl00_ContentPlaceHolder1_WebUserArea1_ddlCountry").val() }, function(data)
            {
                $("#ctl00_ContentPlaceHolder1_WebUserArea1_ddlCountry").empty();

                for (var n in data)
                {
                    $("#ctl00_ContentPlaceHolder1_WebUserArea1_ddlCountry").append("<option value='" + data[n] + "'>" + n + "</option>");
                }
            }, "json");
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabcontent">
        <table class="querylist">
            <td>
                <table class="querylist">
                    <tr>
                        <td align="right">
                            医院名称：
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtHosName" runat="server"></asp:TextBox>
                        </td>
                        <td align="right" rowspan="2">
                            地区
                        </td>
                        <td rowspan="2" align="left">
                            <uc2:WebUserArea ID="WebUserArea1" runat="server" />
                            <asp:HiddenField ID="hisAreaid" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            排序：
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="DropDownList1" runat="server">
                                <asp:ListItem Selected="True" Value="asc">升序</asp:ListItem>
                                <asp:ListItem Value="desc">降序</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </td>
            <td width="100px">
                <asp:Button ID="btnQuery" runat="server" Text="查询" CssClass="searchbtn" SkinID="search" OnClientClick="Button1_onclick()"
                    ToolTip="点击查询符合条件的数据" OnClick="btnQuery_Click" />
            </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:GridView ID="gvwInfo" runat="server" CssClass="mainlist" Width="100%" AutoGenerateColumns="False"
            DataKeyNames="ProcureCatalogID">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%# Container.DataItemIndex+1+(AspNetPager1.CurrentPageIndex-1)*AspNetPager1.PageSize %>
                    </ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="医院名称">
                    <ItemTemplate>
                       <a href="Stocks_Hos.aspx?goodsid=<%# Eval("ProcureCatalogID")%>&hosid=<%# Eval("HospitalID")%>"><%# Eval("HospitalName")%></a>  
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="医院库存" DataField="HospitalTotalStock" />
            </Columns>
        </asp:GridView>
    </div>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>说明:<span>可以点击相应的医院进入查看详细信息</span></li>
        </ul>
    </div>
</asp:Content>
